using System;
using System.Collections.Generic;
using System.Text;

namespace PACKETPARSERMAX20.CORE
{
    public enum SpellModType : int
    {
        SPELLMOD_FLAT = 107,                            // SPELL_AURA_ADD_FLAT_MODIFIER
        SPELLMOD_PCT = 108                             // SPELL_AURA_ADD_PCT_MODIFIER
    };

    public enum PlayerSpellState : int
    {
        PLAYERSPELL_UNCHANGED = 0,
        PLAYERSPELL_CHANGED = 1,
        PLAYERSPELL_NEW = 2,
        PLAYERSPELL_REMOVED = 3
    };

    public enum TrainerSpellState : int
    {
        TRAINER_SPELL_GREEN = 0,
        TRAINER_SPELL_RED = 1,
        TRAINER_SPELL_GRAY = 2
    };

    public enum ActionButtonUpdateState : int
    {
        ACTIONBUTTON_UNCHANGED = 0,
        ACTIONBUTTON_CHANGED = 1,
        ACTIONBUTTON_NEW = 2,
        ACTIONBUTTON_DELETED = 3
    };

    public enum ActionButtonType : int
    {
        ACTION_BUTTON_SPELL = 0,
        ACTION_BUTTON_MACRO = 64,
        ACTION_BUTTON_CMACRO = 65,
        ACTION_BUTTON_ITEM = 128
    };

    //#define  MAX_ACTION_BUTTONS 132                             //checked in 2.3.0

    public enum FactionFlags : int
    {
        FACTION_FLAG_VISIBLE = 0x01,                 // makes visible in client (set or can be set at interaction with target of this faction)
        FACTION_FLAG_AT_WAR = 0x02,                 // enable AtWar-button in client. player controlled (except opposition team always war state), Flag only set on initial creation
        FACTION_FLAG_HIDDEN = 0x04,                 // hidden faction from reputation pane in client (player can gain reputation, but this update not sent to client)
        FACTION_FLAG_INVISIBLE_FORCED = 0x08,                 // always overwrite FACTION_FLAG_VISIBLE and hide faction in rep.list, used for hide opposite team factions
        FACTION_FLAG_PEACE_FORCED = 0x10,                 // always overwrite FACTION_FLAG_AT_WAR, used for prevent war with own team factions
        FACTION_FLAG_INACTIVE = 0x20,                 // player controlled, state stored in characters.data ( CMSG_SET_FACTION_INACTIVE )
        FACTION_FLAG_RIVAL = 0x40                  // flag for the two competing outland factions
    };

    public enum PlayerMovementType : int
    {
        MOVE_ROOT = 1,
        MOVE_UNROOT = 2,
        MOVE_WATER_WALK = 3,
        MOVE_LAND_WALK = 4
    };

    public enum DrunkenState : int
    {
        DRUNKEN_SOBER = 0,
        DRUNKEN_TIPSY = 1,
        DRUNKEN_DRUNK = 2,
        DRUNKEN_SMASHED = 3
    };

    public enum PlayerStateType : uint
    {
        /*
            PLAYER_STATE_DANCE
            PLAYER_STATE_SLEEP
            PLAYER_STATE_SIT
            PLAYER_STATE_STAND
            PLAYER_STATE_READYUNARMED
            PLAYER_STATE_WORK
            PLAYER_STATE_POINT(DNR)
            PLAYER_STATE_NONE // not used or just no state, just standing there?
            PLAYER_STATE_STUN
            PLAYER_STATE_DEAD
            PLAYER_STATE_KNEEL
            PLAYER_STATE_USESTANDING
            PLAYER_STATE_STUN_NOSHEATHE
            PLAYER_STATE_USESTANDING_NOSHEATHE
            PLAYER_STATE_WORK_NOSHEATHE
            PLAYER_STATE_SPELLPRECAST
            PLAYER_STATE_READYRIFLE
            PLAYER_STATE_WORK_NOSHEATHE_MINING
            PLAYER_STATE_WORK_NOSHEATHE_CHOPWOOD
            PLAYER_STATE_AT_EASE
            PLAYER_STATE_READY1H
            PLAYER_STATE_SPELLKNEELSTART
            PLAYER_STATE_SUBMERGED
        */

        PLAYER_STATE_NONE = 0,
        PLAYER_STATE_SIT = 1,
        PLAYER_STATE_SIT_CHAIR = 2,
        PLAYER_STATE_SLEEP = 3,
        PLAYER_STATE_SIT_LOW_CHAIR = 4,
        PLAYER_STATE_SIT_MEDIUM_CHAIR = 5,
        PLAYER_STATE_SIT_HIGH_CHAIR = 6,
        PLAYER_STATE_DEAD = 7,
        PLAYER_STATE_KNEEL = 8,

        PLAYER_STATE_FORM_ALL = 0x00FF0000,

        PLAYER_STATE_FLAG_ALWAYS_STAND = 0x01,                  // byte 4
        PLAYER_STATE_FLAG_CREEP = 0x02000000,
        PLAYER_STATE_FLAG_UNTRACKABLE = 0x04000000,
        PLAYER_STATE_FLAG_ALL = 0xFF000000,
    };

    public enum PlayerFlags : int
    {
        PLAYER_FLAGS_GROUP_LEADER = 0x00000001,
        PLAYER_FLAGS_AFK = 0x00000002,
        PLAYER_FLAGS_DND = 0x00000004,
        PLAYER_FLAGS_GM = 0x00000008,
        PLAYER_FLAGS_GHOST = 0x00000010,
        PLAYER_FLAGS_RESTING = 0x00000020,
        PLAYER_FLAGS_FFA_PVP = 0x00000080,
        PLAYER_FLAGS_CONTESTED_PVP = 0x00000100,               // Player has been involved in a PvP combat and will be attacked by contested guards
        PLAYER_FLAGS_IN_PVP = 0x00000200,
        PLAYER_FLAGS_HIDE_HELM = 0x00000400,
        PLAYER_FLAGS_HIDE_CLOAK = 0x00000800,
        PLAYER_FLAGS_UNK1 = 0x00001000,               // played long time
        PLAYER_FLAGS_UNK2 = 0x00002000,               // played too long time
        PLAYER_FLAGS_UNK3 = 0x00008000,               // strange visual effect (2.0.1), looks like PLAYER_FLAGS_GHOST flag
        PLAYER_FLAGS_SANCTUARY = 0x00010000,               // player entered sanctuary
        PLAYER_FLAGS_UNK4 = 0x00020000,               // taxi benchmark mode (on/off) (2.0.1)
        PLAYER_UNK = 0x00040000,               // 2.0.8...
    };

    // used in PLAYER_FIELD_BYTES values
    public enum PlayerFieldByteFlags : int
    {
        PLAYER_FIELD_BYTE_TRACK_STEALTHED = 0x00000002,
        PLAYER_FIELD_BYTE_RELEASE_TIMER = 0x00000008,       // Display time till auto release spirit
        PLAYER_FIELD_BYTE_NO_RELEASE_WINDOW = 0x00000010        // Display no "release spirit" window at all
    };

    // used in PLAYER_FIELD_BYTES2 values
    public enum PlayerFieldByte2Flags : int
    {
        PLAYER_FIELD_BYTE2_NONE = 0x0000,
        PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW = 0x4000
    };

    public enum ActivateTaxiReplies : int
    {
        ERR_TAXIOK = 0,
        ERR_TAXIUNSPECIFIEDSERVERERROR = 1,
        ERR_TAXINOSUCHPATH = 2,
        ERR_TAXINOTENOUGHMONEY = 3,
        ERR_TAXITOOFARAWAY = 4,
        ERR_TAXINOVENDORNEARBY = 5,
        ERR_TAXINOTVISITED = 6,
        ERR_TAXIPLAYERBUSY = 7,
        ERR_TAXIPLAYERALREADYMOUNTED = 8,
        ERR_TAXIPLAYERSHAPESHIFTED = 9,
        ERR_TAXIPLAYERMOVING = 10,
        ERR_TAXISAMENODE = 11,
        ERR_TAXINOTSTANDING = 12
    };

    public enum LootType : int
    {
        LOOT_CORPSE = 1,
        LOOT_SKINNING = 2,
        LOOT_FISHING = 3,
        LOOT_PICKPOCKETING = 4,                        // unsupported by client, sending LOOT_SKINNING instead
        LOOT_DISENCHANTING = 5,                        // unsupported by client, sending LOOT_SKINNING instead
        LOOT_PROSPECTING = 6,                        // unsupported by client, sending LOOT_SKINNING instead
        LOOT_INSIGNIA = 7,                        // unsupported by client, sending LOOT_SKINNING instead
        LOOT_FISHINGHOLE = 8                         // unsupported by client, sending LOOT_FISHING instead
    };

    public enum MirrorTimerType : int
    {
        FATIGUE_TIMER = 0,
        BREATH_TIMER = 1,
        FIRE_TIMER = 2
    };

    // 2^n values
    public enum PlayerExtraFlags : int
    {
        // gm abilities
        PLAYER_EXTRA_GM_ON = 0x0001,
        PLAYER_EXTRA_GM_ACCEPT_TICKETS = 0x0002,
        PLAYER_EXTRA_ACCEPT_WHISPERS = 0x0004,
        PLAYER_EXTRA_TAXICHEAT = 0x0008,
        PLAYER_EXTRA_GM_INVISIBLE = 0x0010,
        PLAYER_EXTRA_GM_CHAT = 0x0020,               // Show GM badge in chat messages

        // other states
        PLAYER_EXTRA_PVP_DEATH = 0x0100                // store PvP death status until corpse creating.
    };

    // 2^n values
    public enum AtLoginFlags : int
    {
        AT_LOGIN_NONE = 0,
        AT_LOGIN_RENAME = 1,
        AT_LOGIN_RESET_SPELLS = 2,
        AT_LOGIN_RESET_TALENTS = 4
    };

    public enum QuestSlotOffsets : int
    {
        QUEST_ID_OFFSET = 0,
        QUEST_STATE_OFFSET = 1,
        QUEST_COUNTS_OFFSET = 2,
        QUEST_TIME_OFFSET = 3
    };

    public enum QuestSlotStateMask : int
    {
        QUEST_STATE_NONE = 0x0000,
        QUEST_STATE_COMPLETE = 0x0001,
        QUEST_STATE_FAIL = 0x0002
    };

    public enum PlayerSlots
    {
        // first slot for item stored (in any way in player m_items data)
        PLAYER_SLOT_START = 0,
        // last+1 slot for item stored (in any way in player m_items data)
        PLAYER_SLOT_END = 118,
        PLAYER_SLOTS_COUNT = (PLAYER_SLOT_END - PLAYER_SLOT_START)
    };

    public enum EquipmentSlots : int
    {
        EQUIPMENT_SLOT_START = 0,
        EQUIPMENT_SLOT_HEAD = 0,
        EQUIPMENT_SLOT_NECK = 1,
        EQUIPMENT_SLOT_SHOULDERS = 2,
        EQUIPMENT_SLOT_BODY = 3,
        EQUIPMENT_SLOT_CHEST = 4,
        EQUIPMENT_SLOT_WAIST = 5,
        EQUIPMENT_SLOT_LEGS = 6,
        EQUIPMENT_SLOT_FEET = 7,
        EQUIPMENT_SLOT_WRISTS = 8,
        EQUIPMENT_SLOT_HANDS = 9,
        EQUIPMENT_SLOT_FINGER1 = 10,
        EQUIPMENT_SLOT_FINGER2 = 11,
        EQUIPMENT_SLOT_TRINKET1 = 12,
        EQUIPMENT_SLOT_TRINKET2 = 13,
        EQUIPMENT_SLOT_BACK = 14,
        EQUIPMENT_SLOT_MAINHAND = 15,
        EQUIPMENT_SLOT_OFFHAND = 16,
        EQUIPMENT_SLOT_RANGED = 17,
        EQUIPMENT_SLOT_TABARD = 18,
        EQUIPMENT_SLOT_END = 19
    };

    public enum InventorySlots : int
    {
        INVENTORY_SLOT_BAG_0 = 255,
        INVENTORY_SLOT_BAG_START = 19,
        INVENTORY_SLOT_BAG_1 = 19,
        INVENTORY_SLOT_BAG_2 = 20,
        INVENTORY_SLOT_BAG_3 = 21,
        INVENTORY_SLOT_BAG_4 = 22,
        INVENTORY_SLOT_BAG_END = 23,

        INVENTORY_SLOT_ITEM_START = 23,
        INVENTORY_SLOT_ITEM_1 = 23,
        INVENTORY_SLOT_ITEM_2 = 24,
        INVENTORY_SLOT_ITEM_3 = 25,
        INVENTORY_SLOT_ITEM_4 = 26,
        INVENTORY_SLOT_ITEM_5 = 27,
        INVENTORY_SLOT_ITEM_6 = 28,
        INVENTORY_SLOT_ITEM_7 = 29,
        INVENTORY_SLOT_ITEM_8 = 30,
        INVENTORY_SLOT_ITEM_9 = 31,
        INVENTORY_SLOT_ITEM_10 = 32,
        INVENTORY_SLOT_ITEM_11 = 33,
        INVENTORY_SLOT_ITEM_12 = 34,
        INVENTORY_SLOT_ITEM_13 = 35,
        INVENTORY_SLOT_ITEM_14 = 36,
        INVENTORY_SLOT_ITEM_15 = 37,
        INVENTORY_SLOT_ITEM_16 = 38,
        INVENTORY_SLOT_ITEM_END = 39
    };

    public enum BankSlots : int
    {
        BANK_SLOT_ITEM_START = 39,
        BANK_SLOT_ITEM_1 = 39,
        BANK_SLOT_ITEM_2 = 40,
        BANK_SLOT_ITEM_3 = 41,
        BANK_SLOT_ITEM_4 = 42,
        BANK_SLOT_ITEM_5 = 43,
        BANK_SLOT_ITEM_6 = 44,
        BANK_SLOT_ITEM_7 = 45,
        BANK_SLOT_ITEM_8 = 46,
        BANK_SLOT_ITEM_9 = 47,
        BANK_SLOT_ITEM_10 = 48,
        BANK_SLOT_ITEM_11 = 49,
        BANK_SLOT_ITEM_12 = 50,
        BANK_SLOT_ITEM_13 = 51,
        BANK_SLOT_ITEM_14 = 52,
        BANK_SLOT_ITEM_15 = 53,
        BANK_SLOT_ITEM_16 = 54,
        BANK_SLOT_ITEM_17 = 55,
        BANK_SLOT_ITEM_18 = 56,
        BANK_SLOT_ITEM_19 = 57,
        BANK_SLOT_ITEM_20 = 58,
        BANK_SLOT_ITEM_21 = 59,
        BANK_SLOT_ITEM_22 = 60,
        BANK_SLOT_ITEM_23 = 61,
        BANK_SLOT_ITEM_24 = 62,
        BANK_SLOT_ITEM_25 = 63,
        BANK_SLOT_ITEM_26 = 64,
        BANK_SLOT_ITEM_27 = 65,
        BANK_SLOT_ITEM_28 = 66,
        BANK_SLOT_ITEM_END = 67,

        BANK_SLOT_BAG_START = 67,
        BANK_SLOT_BAG_1 = 67,
        BANK_SLOT_BAG_2 = 68,
        BANK_SLOT_BAG_3 = 69,
        BANK_SLOT_BAG_4 = 70,
        BANK_SLOT_BAG_5 = 71,
        BANK_SLOT_BAG_6 = 72,
        BANK_SLOT_BAG_7 = 73,
        BANK_SLOT_BAG_END = 74
    };

    public enum BuyBackSlots : int
    {
        // stored in m_buybackitems
        BUYBACK_SLOT_START = 74,
        BUYBACK_SLOT_1 = 74,
        BUYBACK_SLOT_2 = 75,
        BUYBACK_SLOT_3 = 76,
        BUYBACK_SLOT_4 = 77,
        BUYBACK_SLOT_5 = 78,
        BUYBACK_SLOT_6 = 79,
        BUYBACK_SLOT_7 = 80,
        BUYBACK_SLOT_8 = 81,
        BUYBACK_SLOT_9 = 82,
        BUYBACK_SLOT_10 = 83,
        BUYBACK_SLOT_11 = 84,
        BUYBACK_SLOT_12 = 85,
        BUYBACK_SLOT_END = 86
    };

    public enum KeyRingSlots : int
    {
        KEYRING_SLOT_START = 86,
        KEYRING_SLOT_END = 118
    };

    public enum SwitchWeapon : int
    {
        DEFAULT_SWITCH_WEAPON = 1500,                     //cooldown in ms
        ROGUE_SWITCH_WEAPON = 1000
    };

    public enum TradeSlots : int
    {
        TRADE_SLOT_COUNT = 7,
        TRADE_SLOT_TRADED_COUNT = 6,
        TRADE_SLOT_NONTRADED = 6
    };

    public enum TransferAbortReason : int
    {
        TRANSFER_ABORT_MAX_PLAYERS = 0x0001,           // Transfer Aborted: instance is full
        TRANSFER_ABORT_NOT_FOUND = 0x0002,           // Transfer Aborted: instance not found
        TRANSFER_ABORT_TOO_MANY_INSTANCES = 0x0003,           // You have entered too many instances recently.
        TRANSFER_ABORT_ZONE_IN_COMBAT = 0x0005,           // Unable to zone in while an encounter is in progress.
        TRANSFER_ABORT_INSUF_EXPAN_LVL1 = 0x0106,           // You must have TBC expansion installed to access this area.
        TRANSFER_ABORT_DIFFICULTY1 = 0x0007,           // Normal difficulty mode is not available for %s.
        TRANSFER_ABORT_DIFFICULTY2 = 0x0107,           // Heroic difficulty mode is not available for %s.
        TRANSFER_ABORT_DIFFICULTY3 = 0x0207            // Epic difficulty mode is not available for %s.
    };

    public enum InstanceResetWarningType : int
    {
        RAID_INSTANCE_WARNING_HOURS = 1,                    // WARNING! %s is scheduled to reset in %d hour(s).
        RAID_INSTANCE_WARNING_MIN = 2,                    // WARNING! %s is scheduled to reset in %d minute(s)!
        RAID_INSTANCE_WARNING_MIN_SOON = 3,                    // WARNING! %s is scheduled to reset in %d minute(s). Please exit the zone or you will be returned to your bind location!
        RAID_INSTANCE_WELCOME = 4                     // Welcome to %s. This raid instance is scheduled to reset in %s.
    };

    public enum RestType : int
    {
        REST_TYPE_NO = 0,
        REST_TYPE_IN_TAVERN = 1,
        REST_TYPE_IN_CITY = 2
    };

    public enum DuelCompleteType : int
    {
        DUEL_INTERUPTED = 0,
        DUEL_WON = 1,
        DUEL_FLED = 2
    };

    public enum TeleportToOptions : int
    {
        TELE_TO_GM_MODE = 0x01,
        TELE_TO_NOT_LEAVE_TRANSPORT = 0x02,
        TELE_TO_NOT_LEAVE_COMBAT = 0x04,
        TELE_TO_NOT_UNSUMMON_PET = 0x08,
        TELE_TO_SPELL = 0x10,
    };

    /// Type of environmental damages
    public enum EnviromentalDamage : int
    {
        DAMAGE_EXHAUSTED = 0,
        DAMAGE_DROWNING = 1,
        DAMAGE_FALL = 2,
        DAMAGE_LAVA = 3,
        DAMAGE_SLIME = 4,
        DAMAGE_FIRE = 5,
        DAMAGE_FALL_TO_VOID = 6                                 // custom case for fall without durability loss
    };

    // used at player loading query list preparing, and later result selection
    public enum PlayerLoginQueryIndex : int
    {
        PLAYER_LOGIN_QUERY_LOADFROM = 0,
        PLAYER_LOGIN_QUERY_LOADGROUP = 1,
        PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES = 2,
        PLAYER_LOGIN_QUERY_LOADAURAS = 3,
        PLAYER_LOGIN_QUERY_LOADSPELLS = 4,
        PLAYER_LOGIN_QUERY_LOADQUESTSTATUS = 5,
        PLAYER_LOGIN_QUERY_LOADDAILYQUESTSTATUS = 6,
        PLAYER_LOGIN_QUERY_LOADTUTORIALS = 7,        // common for all characters for some account at specific realm
        PLAYER_LOGIN_QUERY_LOADREPUTATION = 8,
        PLAYER_LOGIN_QUERY_LOADINVENTORY = 9,
        PLAYER_LOGIN_QUERY_LOADACTIONS = 10,
        PLAYER_LOGIN_QUERY_LOADMAILCOUNT = 11,
        PLAYER_LOGIN_QUERY_LOADMAILDATE = 12,
        PLAYER_LOGIN_QUERY_LOADSOCIALLIST = 13,
        PLAYER_LOGIN_QUERY_LOADHOMEBIND = 14,
        PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS = 15,
        PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES = 16,
        PLAYER_LOGIN_QUERY_LOADGUILD = 17,
    };

    public enum CharacterCustomizeFlags : uint
    {
        CHAR_CUSTOMIZE_FLAG_NONE = 0x00000000,
        CHAR_CUSTOMIZE_FLAG_CUSTOMIZE = 0x00000001,       // name, gender, etc...
        CHAR_CUSTOMIZE_FLAG_FACTION = 0x00010000,       // name, gender, faction, etc...
        CHAR_CUSTOMIZE_FLAG_RACE = 0x00100000        // name, gender, race, etc...
    };

    //public struct MovementInfo
    //{
    //    // common
    //    //uint32  flags;
    //    public UInt16 unk1;
    //    public UInt32 time;
    //    public float x, y, z, o;
    //    // transport
    //    public UInt64 t_guid;
    //    public float t_x, t_y, t_z, t_o;
    //    public UInt32 t_time;
    //    // swimming and unk
    //    public float s_pitch;
    //    // last fall time
    //    public UInt32 fallTime;
    //    // jumping
    //    public float velocity, sinAngle, cosAngle, xyspeed;
    //    // spline
    //    public float u_unk1;

    //    //public MovementInfo()
    //    //{
    //    //    //flags =
    //    //    time = t_time = fallTime = 0;
    //    //    unk1 = 0;
    //    //    x = y = z = o = t_x = t_y = t_z = t_o = s_pitch = velocity = sinAngle = cosAngle = xyspeed = u_unk1 = 0.0f;
    //    //    t_guid = 0;
    //    //}


    //};

}
